/*
 * @Author: 严晗 823841034@qq.com
 * @Date: 2023-10-11 15:35:17
 * @LastEditors: 严晗 823841034@qq.com
 * @LastEditTime: 2023-10-11 19:30:50
 * @FilePath: /yike-admin/Users/yanhan/vite-project/src/composables/auth.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useCookies } from '@vueuse/integrations/useCookies'

const tokenKey = 'oa-token'
const cookie = useCookies()

// 设置token
export function setToken(token){
  return cookie.set(tokenKey, token)
}

// 获取token
export function getToken(){
  return cookie.get(tokenKey)
}

// 删除token
export function removeToken(){
  return cookie.remove(tokenKey)
}